package com.itWaiLong.Controller.Comment;

import com.itWaiLong.Dao.Comment;
import com.itWaiLong.Result.Result;
import com.itWaiLong.Service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/selectComment")
public class selectCommentController {

    @Autowired
    private CommentService commentService;

    /**
     * 查看评论
     * @return
     */
    @GetMapping
    public Result<List<Comment>> selectComment() {
       List<Comment> list = commentService.select();
       return Result.success(list);
    }
}
